package com.hlffeng.android.phone.picture.jni;

import java.util.LinkedList;
import java.util.List;

import com.hlffeng.android.phone.picture.tools.ToolUtil;

public class FilesInfoBean {
	
	public final String parentPath;
	public final String timeStr;
	public final long time;
	public final String name;
	
	private List<String> childList = new LinkedList<String>();
	
	public FilesInfoBean(String path,String name,long time){
		this.parentPath = path;
		this.timeStr = ToolUtil.getTimeforLong(time);
		this.time = time;
		this.name = name;
	}
	
	public int getChildCount(){
		return childList.size();
	}
	
	public void addChild(String path){
		childList.add(path);
	}

	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		if(o!=null&&o instanceof FilesInfoBean){
			FilesInfoBean tempPB = (FilesInfoBean)o;
			if(tempPB.parentPath.equals(parentPath)&&tempPB.name.equals(name)){
				return true;
			}
		}
		return false;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return parentPath.length()+name.length();
	}
	
	
}
